package com.inspinia.api.server;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

public class Consumer {
    private static final Logger LOGGER = LoggerFactory.getLogger(Consumer.class);

    public static void main(String[] args) throws IOException {
        LOGGER.info(">>>>> zheng-api-rpc-service 正在启动 <<<<<");
            ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"classpath*:spring/spring-api-dubbo-consumer.xml"});
            context.start();
            System.out.println("服务提供者向zookeeper注册中心注册服务成功（端口：20880）");
            try {
                System.in.read();//保持启动
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } // press any key to exit
            context.close();
        LOGGER.info(">>>>> zheng-api-rpc-service 启动完成 <<<<<");
    }
}
